package database.demo;

import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * Created by 王腾 on 2017/3/16.
 */
public class DataBaseModelMapper implements RowMapper {
    @Override
    public Object mapRow(ResultSet rs, int rowNum) throws SQLException {
        DataBaseModel dataBaseModel = new DataBaseModel();
        dataBaseModel.setBusinessName(rs.getString("business_name"));
        dataBaseModel.setMobileFactory(rs.getString("mobile_factory"));
        dataBaseModel.setShenZhenTongNo(rs.getString("shenzhentong_no"));
        dataBaseModel.setSeid(rs.getString("seid"));
        dataBaseModel.setOldSeid(rs.getString("old_seid"));
        dataBaseModel.setSource(rs.getString("source"));
        dataBaseModel.setYizi(rs.getString("yizi"));
        dataBaseModel.setTime(rs.getDate("time"));
        return dataBaseModel;
    }
}
